using System.ComponentModel.Composition;
using System.Windows.Media.Imaging;
using MediaOwl.Common.ScreenManagement;
using MediaOwl.Netflix.Resources;

namespace MediaOwl.Netflix.ViewModels
{
    [Export, PartCreationPolicy(CreationPolicy.NonShared)]
    public class ShowPictureSingleViewModel : Workitem<NetflixViewModel>
    {
        #region Properties & Backingfields

        private BitmapImage picture;
        public BitmapImage Picture
        {
            get { return picture; }
            set
            {
                picture = value;
                NotifyOfPropertyChange(() => Picture);
            }
        }

        #endregion

        #region Methods

        public void WithPicture(BitmapImage bitmapImage, string title)
        {
            Picture = bitmapImage;
            DisplayName = string.Format(Captions.PictureTitle, title);
        }

        #endregion
    }
}